﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 纺织贸易管理系统;

namespace 后整理管理系统.选择窗体
{
    public partial class 历史备注 : UIForm
    {
        public string CustomerName { get; set; }
        public string Pingming { get; set; }
        public string Beizhu { get; set; } = string.Empty;
        public 历史备注()
        {
            InitializeComponent();          
        }

        private void 历史备注_Load(object sender, EventArgs e)
        {
            uiDataGridView1.AutoGenerateColumns = false;
            uiDataGridView1.DataSource =  Connect.GetSugar().Ado.SqlQuery<liuzhuanmingxi>($"select distinct t3.Beizhu  from liuzhuancard t0 inner join danjumingxitable t1 on t1.danhao=t0.CardNum inner join liuzhuanmingxi t3 on t3.CardNum =t0.CardNum where t1.pingming ='{Pingming }' and t0.Customer ='{CustomerName }'");
        }

        private void uiDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (uiDataGridView1.CurrentRow != null)
            {
                Beizhu = uiDataGridView1.CurrentRow.Cells[Cbeizhu.Name].Value.ToString();
                this.Close();
            }
        }
    }
}
